<template>
    <div>
      <Form :label-width="140">
        <FormItem label="网点名称" required>
          <Input v-model="formData.srvGroupName" placeholder="请输入网点名称" disabled/>
        </FormItem>
        <FormItem label="团长姓名" required>
          <Input v-model="formData.holderName" placeholder="请输入团长姓名"/>
        </FormItem>
        <FormItem label="联系电话" required>
          <Input v-model="formData.holderMobile" placeholder="请输入团长手机号"/>
        </FormItem>
        <FormItem>
          <Button type="primary" @click="Submit">提交</Button>
        </FormItem>
      </Form>
  </div>
</template>
<script>
export default {
  name: "CreateVue",
  props: {
    callbank: Function
  },
  data() {
    return {
      regionArray: [],
      formData: {}
    }
  },
  created() {
    
  },
  methods: {
    Init(data) {
      this.formData = data
    },
    Submit() {
      new this.$rest({
          gateway: 'agrobiz',
          service: "agrobiz-uc",
          url: "/v1.0/user-src/update/srv/group/holder",
          data: {
              pojo: this.formData
          },
          action: (res) => {
            if (res.data.code === 20000) {
              this.$Message.success('更新成功')
              this.callbank()
            } else {
              this.$Message.error(res.data.msg)
            }
          }
      }).post()
    }
  }
}
</script>